package org.wattdepot.cli.command;

import static org.junit.Assert.assertEquals;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import org.wattdepot.cli.CommandLineInterface;

/**
 * Test that checks for valid output within the ListPowerGeneratedTimestampCommand class.
 * 
 * @author Anthony Xu & John Mack
 * 
 */

public class TestPowerTimestamp {

  

  /**
   * Test to see if the powertimestamp displays correct output.
   * @throws Exception NotAuthorizedException, ResourceNotFoundException, 
   *                   BadXmlException, MiscClientException.
   */
    @Test
    public void testListSummary() throws Exception {
      CommandLineInterface cli = new CommandLineInterface();
      List<String> commands = new ArrayList<String>();
      commands.add("power");
      commands.add("SIM_OAHU_GRID");
      commands.add("timestamp");
      commands.add("2009-10-31T23:45:00.000-10:00");

      String sensordataTime = new ListPowerGeneratedTimestampCommand().doCommand(cli, commands);
      assertEquals("correct output", "Power Generated: 5.02E8" , sensordataTime);

    }


}
